﻿<%@ Page Language="C#" MasterPageFile="~/Wap/Agent/AgentSite.Master" AutoEventWireup="true" CodeBehind="MemberList.aspx.cs" Inherits="ZLCMS.Web.Wap.Agent.MemberList" %>

<%@ Register src="Footer.ascx" tagname="Footer" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="pages" runat="server">


<div data-role="page" id="mypage">

	<div data-role="header">
	</div><!-- /header -->

	<div role="main" class="ui-content">
    

    	<!--s top_title-->
        <div class="top_title">
        	<!--s tixian_jilu-->
            <div class="tixian_jilu">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td class="data"><input type="text" name="startDate" id="startDate" value="<%=string.Format("{0:yyyy-MM-dd}", Start) %>"</td>
                    <td class="tex">至</td>
                    <td class="data"><input type="text" name="endDate" id="endDate" value="<%=string.Format("{0:yyyy-MM-dd}", End) %>"/></td>
                    <td><a href="#" class="btn" onclick='queryData();'>过滤</a></td>
                  </tr>
                </table>
            </div>
            <!--e tixian_jilu-->
        </div>
        <!--s top_title-->

    	<!--s top_title-->
        <div class="top_title">总会员<span id="total">0</span>人，当日新增<span id="today">0</span>人</div>
        <!--s top_title-->
    
        <!--s myvip-->
        <div id="myvip">
        </div>
        <!--e myvip-->
   
            	<a data-role="button" data-shadow="false" data-theme="o" id="moreBtn">加载更多</a>
  	</div><!-- /content -->

    <!--S footer -->
	<div data-role="footer" data-position="fixed" data-tap-toggle="false">
                <uc1:Footer ID="Footer1" runat="server" />      
    </div>
    <!--E footer -->
    
</div><!-- /page -->
    
<script src="/wap/lib/common/listviewHandler.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        queryData();
    });

    function queryData() {
        var handler = $('#myvip').listviewHandler();
        handler.initialize({
            loaderBtn: $('#moreBtn'), //加载数据按钮（点击加载下一页）
            emptyHtml: '<div class="box">无记录</div>', //无记录时显示此html
            itemTemplate: '<div class="box">' +
            	'<a href="#"><div class="left" style="background:url({ImageUrl}) no-repeat center; background-size:cover;"></div></a>' +
                '<div class="center">' +
                	'<div class="tex">{MemberName}</div>' +
                	'<div class="registtime"><p>所属：{AgentAccount}</p><p>注册时间：<span>{AddDate}</span><p></div>' +
                '</div>' +
            '</div>', //项模板
            pageIndex: 1, //页码（从1起算）
            pageSize: 20, //页大小
            totalCount: 999, //总记录数
            itemHandler: function (data, itemTemplate, container) {//数据各项处理
                data.AddDate = data.AddDate.substr(0, 10);
                data.ImageUrl = firstFilePath(data.PhotoUrl);
                return itemTemplate.format(data);
            },
            beforeHandleResult: function (result, totalCount, container) {
                $('#today').text(result.TodayCounter);
                $('#total').text(totalCount);
            },
            command: 'Agent.LoadMemberList',
            parameter: { AgentAccount: '<%=AgentAccount %>', Start: $('#startDate').val(), End: $('#endDate').val() }
        });
        handler.nextPage();
    }
</script>

</asp:Content>